
CC=g++
CFLAGS=-W -Wall
LDFLAGS=-lsfml-network -lsfml-system 
EXEC=testSFML
SRC= server.cpp client.cpp main.cpp
OBJ= $(SRC:.cpp=.o)

all: $(EXEC)

$(EXEC): $(OBJ)
	$(CC) -o $@ $^ $(LDFLAGS)

main.o : client.hpp server.hpp

server.o : server.hpp commun.hpp

client.o : client.hpp commun.hpp

%.o: %.cpp
	$(CC) -o $@ -c $< $(CFLAGS) $(LDFLAGS)

.PHONY: clean mrproper

clean:
	rm -rf *.o

mrproper: clean
	rm -rf $(EXEC)
